package com.eqs.enterprisequestionnaire.controller;

import com.eqs.enterprisequestionnaire.result.R;
import com.eqs.enterprisequestionnaire.service.CrossAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/crossAnalysis")
public class CrossAnalysisController {

    @Autowired
    private CrossAnalysisService crossAnalysisService;

    @GetMapping("analyze")
    public R<Map<String, Map<String, Double>>> crossAnalyze(@RequestParam Integer xQuestionId, @RequestParam Integer yQuestionId) {
        return R.success(crossAnalysisService.crossAnalyze(xQuestionId, yQuestionId));
    }
}
